<html>
<body>
<p>
    Login widgets. This package is a collection of widgets to help with logins.
</p>

<h2>Including in your project</h2>
<p>
    To add this to your project add the jar file to your classpath and add the following to your GWT module file:
</p>
<blockquote>
    <code>&lt;inherits name="org.mcarthur.sandy.gwt.login.Login"/&gt;</code>
</blockquote>

<h2>Example Usage</h2>

<p>
    The login widgets requires a {@link org.mcarthur.sandy.gwt.login.client.LoginPanel.LoginListener}
    callback to function.
</p>
<blockquote>
    <code>
<pre style='color:#000020;'>RootPanel rootPanel <span style='color:#308080; '>=</span> RootPanel<span style='color:#308080; '>.</span>get<span style='color:#308080; '>(</span><span style='color:#1060b6; '>"foo"</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>

LoginPanel<span style='color:#308080; '>.</span>LoginListener loginListener <span style='color:#308080; '>=</span> <span style='color:#200080; font-weight:bold; '>new</span> LoginPanel<span style='color:#308080; '>.</span>LoginListener<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span> <span style='color:#406080; '>{</span>
  <span style='color:#200080; font-weight:bold; '>public</span> <span style='color:#7779bb; '>void</span> onSubmit<span style='color:#308080; '>(</span>LoginPanel loginPanel<span style='color:#308080; '>)</span> <span style='color:#406080; '>{</span>
    <span style='color:#595979; '>// check username and password</span>
    loginPanel<span style='color:#308080; '>.</span>setErrorMessage<span style='color:#308080; '>(</span><span style='color:#1060b6; '>"Login failed!"</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span> <span style='color:#595979; '>// report an error</span>
    loginPanel<span style='color:#308080; '>.</span>reenable<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span><span style='color:#406080; '>;</span> <span style='color:#595979; '>// allow another attempt</span>
  <span style='color:#406080; '>}</span>
<span style='color:#406080; '>}</span><span style='color:#406080; '>;</span>

LoginPanel loginPanel <span style='color:#308080; '>=</span> <span style='color:#200080; font-weight:bold; '>new</span> LoginPanel<span style='color:#308080; '>(</span>loginListener<span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>

rootPanel<span style='color:#308080; '>.</span>add<span style='color:#308080; '>(</span>loginPanel<span style='color:#308080; '>)</span><span style='color:#406080; '>;</span>
</pre>
    </code>
</blockquote>

</body>
</html>